package com.yyw.foodie.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yiyw
 * @ClassName RestHignLevelConfig.java
 * @Description TODO
 * @createTime 2021年07月17日 13:34:00
 */
@Configuration
public class RestHignLevelConfig {

    @Bean
    public RestHighLevelClient restHighLevelClient() {
        return new RestHighLevelClient(RestClient.builder(new HttpHost("192.168.2.4", 9200, "http")));
    }
}
